package com.transfer.entity;

import java.util.Date;

import javax.persistence.CascadeType;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.ManyToOne;
import javax.persistence.Table;

import com.fasterxml.jackson.annotation.JsonFormat;
import com.staff.entity.Staff;

@Entity
@Table(name="t_person_transfer")
public class PersonTransfer {
	private Long id;
	private Staff staff;
	private String originalDepa;//原部门
	private String originalPosi;//原职位
	private String newDepa;//调入部门
	private String newPosi;//调入职位
	private Date deployDate;//调动日期
	private String staffName;
	private String staffNum;
	
	@Id
	@GeneratedValue(strategy=GenerationType.IDENTITY)
	public Long getId() {
		return id;
	}
	@ManyToOne(cascade=CascadeType.ALL)
	public Staff getStaff() {
		return staff;
	}

	public String getStaffName() {
		return staffName;
	}
	public String getStaffNum() {
		return staffNum;
	}
	public String getOriginalDepa() {
		return originalDepa;
	}
	public String getOriginalPosi() {
		return originalPosi;
	}
	public String getNewDepa() {
		return newDepa;
	}
	public String getNewPosi() {
		return newPosi;
	}
	@JsonFormat(pattern = "yyyy/MM/dd HH:mm:ss",timezone = "GMT+8")
	public Date getDeployDate() {
		return deployDate;
	}
	public void setId(Long id) {
		this.id = id;
	}
	public void setOriginalDepa(String originalDepa) {
		this.originalDepa = originalDepa;
	}
	public void setOriginalPosi(String originalPosi) {
		this.originalPosi = originalPosi;
	}
	public void setNewDepa(String newDepa) {
		this.newDepa = newDepa;
	}
	public void setNewPosi(String newPosi) {
		this.newPosi = newPosi;
	}
	public void setDeployDate(Date deployDate) {
		this.deployDate = deployDate;
	}

	public void setStaff(Staff staff) {
		this.staff = staff;
	}
	public void setStaffName(String staffName) {
		this.staffName = staffName;
	}
	public void setStaffNum(String staffNum) {
		this.staffNum = staffNum;
	}
	
	
}
